﻿
import socket

MSN_Server_PORT = 1863
DATA_POOL = ''

class SockConn:
    '''Create socket connection to MSN Server'''
    
    def __init__(self, serverName):
        self.host = serverName
        self.port = MSN_Server_PORT
    
    def connectServer(self):
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        self.sock.connect((self.host, self.port))
    
    def sendData(self, string):
        self.sock.sendall(bytes(string, 'UTF-8'))
        
    def recvData(self):
        byteData = self.sock.recv(100)
        data = byteData.decode()
        msgEndIndex = data.find('\r\n')
        if msgEndIndex >= 0:
            msg = 
            
        
        
        
        
        
        
        
        
        
        